package com.boot.task;

import cn.hutool.cron.task.Task;
import com.boot.system.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class LogJob implements Task {

    @Autowired
    LogService logService;

    @Override
    public void execute() {
        // 清理7天前的日志
        logService.clearLog(7);
    }

}
